﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebAppMatrix
{
    public class MatrixGuid
    {
        #region 生成空的GUID

        private static string emptyGUID;
        /// <summary>
        /// 空的32位GUID字符串
        /// </summary>
        public static string EmptyGUID
        {
            get
            {
                if (string.IsNullOrEmpty(emptyGUID))
                    emptyGUID = Guid.Empty.ToString("N");
                return emptyGUID;
            }
        }

        #endregion

        #region 生成新的GUID
        /// <summary>
        /// 新的32位GUID字符串
        /// </summary>
        public static string NewGUID
        {
            get { return Guid.NewGuid().ToString("N"); }
        }

        #endregion
    }
}
